const Vue = require("vue").default;
const routerModule = require("./router/index");
const httpModule = require("./http/index");
const fileModule = require("./http/file");
const layerModule = require("./layer/index");
const globalConfig = require("@/config");
const $constant = require("./constant");
const modelUtils = require("@/utils/model")

// 原型继承
Object.assign(Vue.prototype, {
 ...httpModule,
 ...fileModule,
 ...layerModule,
  $constant,
});

// 全局混入
Vue.mixin({
  data() {
    return {
      $static: globalConfig.staticPath,
    };
  },
  methods: {
    ...routerModule,
    $model: modelUtils.model,
  },
});
